package twelve.decorator.homework;

import java.io.*;

public  class Transfer extends FilterInputStream {
    String result;
    InputStream stream ;
    protected Transfer(InputStream in) throws IOException {
        super(in);
        this.stream =in;
        StringBuffer buffer = new StringBuffer();
        int c;
        while((c = stream.read()) !=-1){
            if(c>='a'&&c<='z'){
                c+='A'-'a';
            }
            buffer.append((char)c);
        }
        result = buffer.toString();
    }

    public void show(){
        System.out.println(result);
    }
}
